﻿using System;
using Character;
using UnityEngine;
using UnityEngine.UI;
using Utility;

// Token: 0x02000201 RID: 513
public class CharaExpGages : MonoBehaviour
{
	// Token: 0x06000E17 RID: 3607 RVA: 0x00057E70 File Offset: 0x00056070
	public void Setup(HEROINE heroineID, Personality personality)
	{
		this.nameText.text = Female.HeroineName(heroineID);
		this.personality = personality;
		this.gages[0].fillAmount = personality.ExpFeelVaginaRate;
		this.gages[1].fillAmount = personality.ExpFeelAnusRate;
		this.gages[2].fillAmount = personality.ExpIndecentLanguageRate;
		this.gages[3].fillAmount = personality.ExpLikeFeratioRate;
		this.gages[4].fillAmount = personality.ExpLikeSpermRate;
		for (int i = 0; i < this.gages.Length; i++)
		{
			bool active = this.gages[i].fillAmount >= 1f;
			this.unlocks[i].gameObject.SetActive(active);
		}
		this.SetVergineText();
		personality.AdjustmentExp();
		if (personality.expFeelVagina >= 15)
		{
			personality.feelVagina = true;
		}
		if (personality.expFeelAnus >= 15)
		{
			personality.feelAnus = true;
		}
		if (personality.expIndecentLanguage >= 21)
		{
			personality.indecentLanguage = true;
		}
		if (personality.expLikeFeratio >= 15)
		{
			personality.likeFeratio = true;
		}
		if (personality.expLikeSperm >= 15)
		{
			personality.likeSperm = true;
		}
	}

	// Token: 0x06000E18 RID: 3608 RVA: 0x00057FA8 File Offset: 0x000561A8
	private void Start()
	{
	}

	// Token: 0x06000E19 RID: 3609 RVA: 0x00057FAC File Offset: 0x000561AC
	private void Update()
	{
		this.gages[0].fillAmount = Tween.Spring(this.gages[0].fillAmount, this.personality.ExpFeelVaginaRate, this.K, this.minSpeed, 0f, 0f);
		this.gages[1].fillAmount = Tween.Spring(this.gages[1].fillAmount, this.personality.ExpFeelAnusRate, this.K, this.minSpeed, 0f, 0f);
		this.gages[2].fillAmount = Tween.Spring(this.gages[2].fillAmount, this.personality.ExpIndecentLanguageRate, this.K, this.minSpeed, 0f, 0f);
		this.gages[3].fillAmount = Tween.Spring(this.gages[3].fillAmount, this.personality.ExpLikeFeratioRate, this.K, this.minSpeed, 0f, 0f);
		this.gages[4].fillAmount = Tween.Spring(this.gages[4].fillAmount, this.personality.ExpLikeSpermRate, this.K, this.minSpeed, 0f, 0f);
		for (int i = 0; i < this.gages.Length; i++)
		{
			bool active = this.gages[i].fillAmount >= 1f;
			this.unlocks[i].gameObject.SetActive(active);
		}
		if (!this.virgineChanged)
		{
			this.virginDelay -= Time.deltaTime;
			if (this.virginDelay <= 0f)
			{
				this.SetVergineText();
				this.virgineChanged = true;
			}
		}
	}

	// Token: 0x06000E1A RID: 3610 RVA: 0x00058178 File Offset: 0x00056378
	private void SetVergineText()
	{
		this.vaginaText.text = ((!this.personality.vaginaVirgin) ? "性器非処女" : "性器処女");
		this.analText.text = ((!this.personality.analVirgin) ? "アナル非処女" : "アナル処女");
	}

	// Token: 0x04000E84 RID: 3716
	[SerializeField]
	private Text nameText;

	// Token: 0x04000E85 RID: 3717
	[SerializeField]
	private Image[] gages = new Image[5];

	// Token: 0x04000E86 RID: 3718
	[SerializeField]
	private Image[] unlocks = new Image[5];

	// Token: 0x04000E87 RID: 3719
	[SerializeField]
	private float K = 10f;

	// Token: 0x04000E88 RID: 3720
	[SerializeField]
	private float minSpeed = 0.01f;

	// Token: 0x04000E89 RID: 3721
	[SerializeField]
	private Text vaginaText;

	// Token: 0x04000E8A RID: 3722
	[SerializeField]
	private Text analText;

	// Token: 0x04000E8B RID: 3723
	private Personality personality;

	// Token: 0x04000E8C RID: 3724
	private bool virgineChanged;

	// Token: 0x04000E8D RID: 3725
	private float virginDelay = 1f;
}
